package pack0531;

public class DemoF {
    public static void main(String[] args){
        //随机数
        double random = Math.random(); //[0,1)
        System.out.println(random);
        int number = (int)(random*10+1);
        System.out.println(number);
        //1.书写一个1-6的随机数
        double a = Math.random();
        double b= random*6+1;
        System.out.println(b);
        //2.书写一个1-33的随机数
        double c = Math.random();
        int d = (int)(random*33+1);
        System.out.println(d);
        //3.书写一个18-40的随机数
        double e = Math.random();
        int f = (int)(random*22+18);
        System.out.println(f);

    }


}
